//
//	GetInterviewedListRootClass.m
//	Model file generated using JSONExport: https://github.com/Ahmed-Ali/JSONExport



#import "GetInterviewedListRootClass.h"

NSString *const kGetInterviewedListRootClassFirstPage = @"firstPage";
NSString *const kGetInterviewedListRootClassFirstResult = @"firstResult";
NSString *const kGetInterviewedListRootClassLastPage = @"lastPage";
NSString *const kGetInterviewedListRootClassList = @"list";
NSString *const kGetInterviewedListRootClassNextPage = @"nextPage";
NSString *const kGetInterviewedListRootClassPageNo = @"pageNo";
NSString *const kGetInterviewedListRootClassPageSize = @"pageSize";
NSString *const kGetInterviewedListRootClassPrePage = @"prePage";
NSString *const kGetInterviewedListRootClassTotalCount = @"totalCount";
NSString *const kGetInterviewedListRootClassTotalPage = @"totalPage";

@interface GetInterviewedListRootClass ()
@end
@implementation GetInterviewedListRootClass




/**
 * Instantiate the instance using the passed dictionary values to set the properties values
 */

-(instancetype)initWithDictionary:(NSDictionary *)dictionary
{
	self = [super init];
	if(![dictionary[kGetInterviewedListRootClassFirstPage] isKindOfClass:[NSNull class]]){
		self.firstPage = [dictionary[kGetInterviewedListRootClassFirstPage] boolValue];
	}

	if(![dictionary[kGetInterviewedListRootClassFirstResult] isKindOfClass:[NSNull class]]){
		self.firstResult = [dictionary[kGetInterviewedListRootClassFirstResult] integerValue];
	}

	if(![dictionary[kGetInterviewedListRootClassLastPage] isKindOfClass:[NSNull class]]){
		self.lastPage = [dictionary[kGetInterviewedListRootClassLastPage] boolValue];
	}

	if(dictionary[kGetInterviewedListRootClassList] != nil && [dictionary[kGetInterviewedListRootClassList] isKindOfClass:[NSArray class]]){
		NSArray * listDictionaries = dictionary[kGetInterviewedListRootClassList];
		NSMutableArray * listItems = [NSMutableArray array];
		for(NSDictionary * listDictionary in listDictionaries){
			GetInterviewedListList * listItem = [[GetInterviewedListList alloc] initWithDictionary:listDictionary];
			[listItems addObject:listItem];
		}
		self.list = listItems;
	}
	if(![dictionary[kGetInterviewedListRootClassNextPage] isKindOfClass:[NSNull class]]){
		self.nextPage = [dictionary[kGetInterviewedListRootClassNextPage] integerValue];
	}

	if(![dictionary[kGetInterviewedListRootClassPageNo] isKindOfClass:[NSNull class]]){
		self.pageNo = [dictionary[kGetInterviewedListRootClassPageNo] integerValue];
	}

	if(![dictionary[kGetInterviewedListRootClassPageSize] isKindOfClass:[NSNull class]]){
		self.pageSize = [dictionary[kGetInterviewedListRootClassPageSize] integerValue];
	}

	if(![dictionary[kGetInterviewedListRootClassPrePage] isKindOfClass:[NSNull class]]){
		self.prePage = [dictionary[kGetInterviewedListRootClassPrePage] integerValue];
	}

	if(![dictionary[kGetInterviewedListRootClassTotalCount] isKindOfClass:[NSNull class]]){
		self.totalCount = [dictionary[kGetInterviewedListRootClassTotalCount] integerValue];
	}

	if(![dictionary[kGetInterviewedListRootClassTotalPage] isKindOfClass:[NSNull class]]){
		self.totalPage = [dictionary[kGetInterviewedListRootClassTotalPage] integerValue];
	}

	return self;
}


/**
 * Returns all the available property values in the form of NSDictionary object where the key is the approperiate json key and the value is the value of the corresponding property
 */
-(NSDictionary *)toDictionary
{
	NSMutableDictionary * dictionary = [NSMutableDictionary dictionary];
	dictionary[kGetInterviewedListRootClassFirstPage] = @(self.firstPage);
	dictionary[kGetInterviewedListRootClassFirstResult] = @(self.firstResult);
	dictionary[kGetInterviewedListRootClassLastPage] = @(self.lastPage);
	if(self.list != nil){
		NSMutableArray * dictionaryElements = [NSMutableArray array];
		for(GetInterviewedListList * listElement in self.list){
			[dictionaryElements addObject:[listElement toDictionary]];
		}
		dictionary[kGetInterviewedListRootClassList] = dictionaryElements;
	}
	dictionary[kGetInterviewedListRootClassNextPage] = @(self.nextPage);
	dictionary[kGetInterviewedListRootClassPageNo] = @(self.pageNo);
	dictionary[kGetInterviewedListRootClassPageSize] = @(self.pageSize);
	dictionary[kGetInterviewedListRootClassPrePage] = @(self.prePage);
	dictionary[kGetInterviewedListRootClassTotalCount] = @(self.totalCount);
	dictionary[kGetInterviewedListRootClassTotalPage] = @(self.totalPage);
	return dictionary;

}

/**
 * Implementation of NSCoding encoding method
 */
/**
 * Returns all the available property values in the form of NSDictionary object where the key is the approperiate json key and the value is the value of the corresponding property
 */
- (void)encodeWithCoder:(NSCoder *)aCoder
{
	[aCoder encodeObject:@(self.firstPage) forKey:kGetInterviewedListRootClassFirstPage];	[aCoder encodeObject:@(self.firstResult) forKey:kGetInterviewedListRootClassFirstResult];	[aCoder encodeObject:@(self.lastPage) forKey:kGetInterviewedListRootClassLastPage];	if(self.list != nil){
		[aCoder encodeObject:self.list forKey:kGetInterviewedListRootClassList];
	}
	[aCoder encodeObject:@(self.nextPage) forKey:kGetInterviewedListRootClassNextPage];	[aCoder encodeObject:@(self.pageNo) forKey:kGetInterviewedListRootClassPageNo];	[aCoder encodeObject:@(self.pageSize) forKey:kGetInterviewedListRootClassPageSize];	[aCoder encodeObject:@(self.prePage) forKey:kGetInterviewedListRootClassPrePage];	[aCoder encodeObject:@(self.totalCount) forKey:kGetInterviewedListRootClassTotalCount];	[aCoder encodeObject:@(self.totalPage) forKey:kGetInterviewedListRootClassTotalPage];
}

/**
 * Implementation of NSCoding initWithCoder: method
 */
- (instancetype)initWithCoder:(NSCoder *)aDecoder
{
	self = [super init];
	self.firstPage = [[aDecoder decodeObjectForKey:kGetInterviewedListRootClassFirstPage] boolValue];
	self.firstResult = [[aDecoder decodeObjectForKey:kGetInterviewedListRootClassFirstResult] integerValue];
	self.lastPage = [[aDecoder decodeObjectForKey:kGetInterviewedListRootClassLastPage] boolValue];
	self.list = [aDecoder decodeObjectForKey:kGetInterviewedListRootClassList];
	self.nextPage = [[aDecoder decodeObjectForKey:kGetInterviewedListRootClassNextPage] integerValue];
	self.pageNo = [[aDecoder decodeObjectForKey:kGetInterviewedListRootClassPageNo] integerValue];
	self.pageSize = [[aDecoder decodeObjectForKey:kGetInterviewedListRootClassPageSize] integerValue];
	self.prePage = [[aDecoder decodeObjectForKey:kGetInterviewedListRootClassPrePage] integerValue];
	self.totalCount = [[aDecoder decodeObjectForKey:kGetInterviewedListRootClassTotalCount] integerValue];
	self.totalPage = [[aDecoder decodeObjectForKey:kGetInterviewedListRootClassTotalPage] integerValue];
	return self;

}

/**
 * Implementation of NSCopying copyWithZone: method
 */
- (instancetype)copyWithZone:(NSZone *)zone
{
	GetInterviewedListRootClass *copy = [GetInterviewedListRootClass new];

	copy.firstPage = self.firstPage;
	copy.firstResult = self.firstResult;
	copy.lastPage = self.lastPage;
	copy.list = [self.list copyWithZone:zone];
	copy.nextPage = self.nextPage;
	copy.pageNo = self.pageNo;
	copy.pageSize = self.pageSize;
	copy.prePage = self.prePage;
	copy.totalCount = self.totalCount;
	copy.totalPage = self.totalPage;

	return copy;
}
@end